package middlewares

import (
	"fmt"
	"github.com/gin-gonic/gin"
)

func CarMiddleWare01(c *gin.Context) {
	fmt.Println("CarMiddleWare01-start...")
	c.Next()
	carId, exists := c.Get("car_id")
	if exists {
		fmt.Println("car_id:", carId.(string))
	}
	fmt.Println("CarMiddleWare01-end...")
}
func CarMiddleWare02(c *gin.Context) {
	fmt.Println("CarMiddleWare02-start...")
	c.Next()
	carId, exists := c.Get("car_id")
	if exists {
		fmt.Println("car_id:", carId.(string))
	}
	fmt.Println("CarMiddleWare02-end...")
}
